package com.springboot.linstener;

import org.springframework.context.ApplicationContext;
import org.springframework.web.context.WebApplicationContext;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class MyLinsener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("我是监听的方法，tomcat容器启动过后需要调用我");


    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }
}
